package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.UserStatistics;
import com.ruoyi.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: 陈明明
 * @Description: TODO
 * @DateTime: 2024/8/16 14:18
 **/
@RestController
@RequestMapping("/api/report")
public class ReportController {

    @Autowired
    private UserService userService;

    @GetMapping("/userStatistics")
    public AjaxResult getUserStatistics() {
        List<UserStatistics> stats = userService.getUserStatistics();
        return AjaxResult.success(stats);
    }
}

